﻿using ASmile.Com;
using ASmile.Com.Da;
using ASmile.Com.DictCom;
using ASmile.DBModel;
using Microsoft.AspNetCore.Mvc;

namespace ASmile.Web.ApiControllers.SysManage
{
    [Route("api/SysManage/[controller]/[action]")]
    [ApiExplorerSettings(GroupName = "SysManage")]
    [UserAuthorize(true, false)]
    public class DictHelperController : BaseApiController<DictHelperBLL>
    {
        /// <summary>
        /// 获取多个Dict类型的字典集合
        /// </summary>
        [HttpPost]
        public ApiResultList<Dict_Common> GetDicts(ArgDictSearch arg)
        {
            return BLLObj.GetDicts(arg);
        }        
        /// <summary>
        /// 获取助记码，（五笔、拼音）
        /// </summary>
        [HttpPost]
        public ApiResult<RetEasyCode> GetEasyCode(string word)
        {
            return BLLObj.GetEasyCode(word);
        }
        /// <summary>
        /// 获取业务单据号,{ BNoType : 1(数值 EmBNoType ) } 
        /// </summary>
        [HttpPost]
        public ApiResult<string> GetBNo(int bNoType)
        {
            return BLLObj.GetBNoStr(bNoType);
        }        
        /// <summary>
        /// 获取区域列表
        /// </summary>
        [HttpPost]
        public ApiResultList<Dict_Area> GetAreas(ArgGetAreas arg)
        {
            return BLLObj.GetAreas(arg);
        }
    }
}